﻿using CoreShop.Library;
using SqlSugar;
using Sunny.UI;
using System;
using System.Runtime.InteropServices.ComTypes;

namespace CoreShop.App
{
    public partial class UINumTextBox : UIUserControl
    {
        public UINumTextBox()
        {
            InitializeComponent();
        }

        private void txtNumber_KeyPress(object sender, System.Windows.Forms.KeyPressEventArgs e)
        {
            if (e.KeyChar == 12290)
            {
                string str = txtNumber.Text;
                int idx = txtNumber.SelectionStart;
                str = str.Insert(idx, ".");
                txtNumber.Text = str;
                txtNumber.SelectionStart = idx + 1;
                txtNumber.Focus();
                e.Handled = true;
            }
        }
    }
}
